<%@ page language="java" pageEncoding="utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>用户登录</title>
    <link rel="icon" type="image/x-icon" href="${pageContext.request.contextPath}/resources/images/favicon.ico"/>
    <style type="text/css">
        body,html{
            width: 100%;
        }
        body{
            background-image: url("/shop/resources/images/beijing.jpg");
            background-repeat: no-repeat;
            background-size: 100% 100%;
            margin: 0;
        }
        .box_login{width: 50%;
            height: 50%;
            margin: 0 auto;
            background-color: black;
            /*透明*/
            filter:opacity(0.9);
            /*定位*/
            position: relative;
            top: 25%;
            border-radius: 5px;
        }
        .login{
            text-align: center;
        }
        h2
        {
            font-family: 幼圆;
            font-size: 40px;
            color:white;
        }
        p{
            font-family: "Wingdings 2";
            color: #8AA2CC;
            font-size: 20px;
        }
        /*单独设置input框 type=text的样式*/
        input[type='text']{
            /* 	规定文本块的首行缩进。 */
            text-indent: 10px;
            width: auto;

            /* 设置圆角 */
            border-radius: 10px;
            color: #990099;
        }
        input[type='password']{

            border-radius: 10px;
        }
        input[type='radio']{
            /*圆圈大小*/
            zoom: 100%;
        }
        select{
            height: 26px;
        }
    </style>
</head>
<body>
<div class="box_login">
    <form action="${pageContext.request.contextPath}/LoginServlet" method="post">
        <div class="login">
            <h2>
                登录
            </h2>
            <p>
                用户名:<input type="text" name="username" placeholder="请输入用户名" required/>
            </p>
            <p>
                密&emsp;码:<input type="password" name="password" placeholder="请输入密码" required/>
            </p>
            <p>
                <input type="radio" name="role" value="2"/>用户
                <input type="radio" name="role" value="1"/>管理员
            </p>
            <p>
                <input id="log" type="submit" value="登录"/>
            </p>
            <p style="color: red">
                ${requestScope.msg}
            </p>
            <p>
                还没有账号？<a href="${pageContext.request.contextPath}/ToRegisterServlet">立即注册</a>
            </p>
        </div>
    </form>
</div>
</body>
</html>
